package com.ynding.spring.idea.ddd.biz.service.impl.lottery;

import com.ynding.spring.idea.ddd.biz.shared.lottery.LotteryManage;
import com.ynding.spring.idea.ddd.common.aax.bo.ResponseBean;
import com.ynding.spring.idea.ddd.common.aax.util.LotteryContext;
import com.ynding.spring.idea.ddd.common.service.facade.lottery.api.LotteryFacade;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author ynding
 * @version 2022/9/11
 **/
@Service
@RequiredArgsConstructor
public class LotteryFacadeImpl implements LotteryFacade {

    private final LotteryManage lotteryManage;

    @Override
    public ResponseBean participateLottery(LotteryContext lotteryContext) {
        //校验用户登录信息
        validateLoginInfo(lotteryContext);

        // TODO
        return ResponseBean.ok(lotteryManage.issueLottery(lotteryContext));
    }

    private void validateLoginInfo(LotteryContext lotteryContext) {
    }

}
